#ifndef MAINSCENE_H
#define MAINSCENE_H

#include <QMainWindow>

namespace Ui {
class MainScene;
}

class MainScene : public QMainWindow
{
        Q_OBJECT

    public:
        explicit MainScene(QWidget *parent = 0);
        ~MainScene();
        #define NUM 4//拼图的长宽，暂时固定，不可修改，后期优化
        #define RANDTIME 1000//打乱次数
        #define VOLUME 10
        void paintEvent(QPaintEvent *);
        bool ifWin();
        void keyPressEvent(QKeyEvent *event);
        void CreatNewGame();
        void timerEvent(QTimerEvent *);

    private:
        Ui::MainScene *ui;
        int Game[NUM][NUM];
        void init();
        void GoUp();
        void GoDown();
        void GoLeft();
        void GoRight();
        void MoveSound();
        void WinSound();
        void WarningSound();
        void StartSound();

};

#endif // MAINSCENE_H